package com.prj.ufdm.cloud.ms.test.enums;

/**
 * Desc: 测试模块返回码（编码规则：09 + 2位功能编号  + 3位错误编号）
 * @author 胡义振
 * @date 2020-03-02
 */
public enum MsTestRetCodeEnum {
	
	RET_CODE_0901001("0901001",""),
	RET_CODE_0999998("0999998","执行SQL发生异常"),
	RET_CODE_0999999("0999999","测试模块系统异常");
	
	private String code;
	private String message;
	
	MsTestRetCodeEnum(String code,String message){
		this.code = code;
		this.message = message;
	}

	public static String getRetMessage(String retCode){
		String rtnRetCode = "";
		for (MsTestRetCodeEnum coreRetCodeEnum : MsTestRetCodeEnum.values()) {
			if(coreRetCodeEnum.code.equals(retCode)){
				rtnRetCode = coreRetCodeEnum.message;
			}
	    }
		return rtnRetCode;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

}
